<extend name="Public/base" />

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2> {$title}</h2>
    </div>
    <div ng-controller="DingjiaCtrl" ng-init="init('ybz')" style="font-size: 2px;">
        <form action="{:U('addprolist')}" method="post">
            <div class="cf">
                <table class="data-table table-striped" style="width: 100%">
                    <tr>
                        <th>批次</th>
                        <td colspan="3" style="font-size: 20px;">
                            {$batch}
                            <input type="hidden" name="batch" value="{$batch}">
                        </td>
                    </tr>
                    <tr>
                        <th>采购人：</th>
                        <td><input type="text" name="adapter" value="姜主任" class="form-control input-3x text-large"/></td>
                        <th>联系方式：</th>
                        <td><input type="text" name="phone" value="13777777777" class="form-control input-3x"/></td>
                        <th>采购市场：</th>
                        <td><input type="text" name="market" value="嘉兴"  class="input-3x form-control"/></td>
                    </tr>
                    <tr>
                        <th>采购日期：</th>
                        <td><input type="text" name="adapte_date" class="time input-3x form-control"/></td>
                        <th>预计到货时间：</th>
                        <td><input type="text" name="pre_date" class="time input-3x form-control"/></td>
                        <th>实际到货时间：</th>
                        <td><input type="text" name="real_date" class="time input-3x form-control "/></td>
                    </tr>
                    <tr>
                        <th>合计运费：</th>
                        <td><input type="text" name="total_trans_fee" ng-model="batch.total_trans_fee" value=""  class="input-3x form-control"/></td>
                        <th>货款：</th>
                        <td><input type="text" name="total_goods_fee" ng-model="batch.total_goods_fee" value="" class="input-3x form-control"/></td>
                        <!--<th>采购市场：</th>-->
                        <!--<td><input type="text" class="input-2x"/></td>-->
                    </tr>
                    <tbody>
                    </tbody>
                </table>
            </div>
            <div class="sleft">
                <span class="btn btn-primary" ng-click="more()">添加商品+</span>
            </div>
            <div class="data-table table-striped">
                <table>
                    <thead>

                    <tr>
                        <th>商品编码</th>
                        <th>商品名称</th>
                        <th>规格</th>
                        <th>单箱毛重</th>
                        <th>单箱皮重</th>
                        <th>总重</th>
                        <th>总件数</th>
                        <th>单价</th>
                        <th>食用率</th>
                        <th>损耗率</th>
                        <th>箱费</th>
                        <th>运费<span class="glyphicon glyphicon-question-sign" title="不计入总运费计算"></span></th>
                        <th>货款</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="item in items">
                            <td>
                                <input type="text" name="pname[]" ng-model="item.pname" class="form-control input-2x"/>
                            </td>
                            <td>
                                <input type="text" name="pname[]" ng-model="item.pname" class="form-control input-2x"/>
                            </td>
                            <td>
                                <input type="text" name="spec[]" ng-model="item.spec" class="form-control input-2-x"/>
                            </td>
                            <td>
                                <input type="text" name="unit_weight[]" value="8.5" class="form-control input-x"/>
                            </td>
                            <td>
                                <input type="text" name="box_weight[]" value="0" class="form-control input-x"/>
                            </td>
                            <td>
                                <input type="text" name="total_weight[]" value="1000" class="form-control input-2-x"/>
                            </td>
                            <td>
                                <input type="text" name="spec_number[]" value="28" class="form-control input-x"/>
                            </td>
                            <td>
                                <input type="text" name="spec_price[]" value="390" class="form-control input-x"/>
                            </td>
                            <td>
                                <input type="text" max="1" name="percent[]" value="1" class="form-control input-x"/>
                            </td>
                            <td>
                                <input type="text" max="1" name="lose[]" value="0.15" class="form-control input-2-x"/>
                            </td>
                            <td>
                                <input type="text" name="trans_fee[]" value="2" class="form-control input-x"/>
                            </td>
                            <td>
                                <input type="text" name="box_fee[]" value="0" class="form-control input-x"/>
                            </td>
                            <td>
                                <input type="text" name="total_fee[]" ng-model="item.total_fee" value="10920" class="form-control input-2-x"/>
                            </td>
                            <td>
                                <input type="text" name="BIN[]" value="{{item.BIN}}" class="hide">
                                <span class="btn btn-primary" ng-click="remove($index)">-</span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
             <div class="col-md-12">
                    <button type="button" class="btn btn-primary" ng-click="check()" >成本计算</button>
                    <a  class="btn btn-success" id="fh" onclick="javascript:history.back(-1); return false;">返 回</a>
             </div>
        </form>
    </div>
    <div class="page">
        {$_page}
    </div>

</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U(ACTION_NAME)}');
        $(".time").datetimepicker({
            format: 'Y-m-d'
        });
        $("text").css("font-size",2);
    </script>
</block>
